--surface.CreateFont( "Verdana", 44, 700, true, false, "TextBig" )
--surface.CreateFont( "Verdana", 16, 700, true, false, "TextNormal" )

function ScoreboardShow()
	GAMEMODE.ShowScoreboard = true
	gui.EnableScreenClicker( true )
	return true
end
hook.Add( "ScoreboardShow", "Show", ScoreboardShow )

function ScoreboardHide()
	GAMEMODE.ShowScoreboard = false
end
hook.Add( "ScoreboardHide", "Hide", ScoreboardHide )

function HUDDrawScoreBoard()
if not GAMEMODE.ShowScoreboard then return true end
local x = 6
local y = 2
	local bgcolor = Color( 65, 65, 65, 255 )
	local scolor = Color( 0, 195, 255, 255 )
	local ccolor = Color( 0, 195, 35, 255 )
	DrawBox( 0, 36, 335, 13, bgcolor, 2 )
	for k,v in pairs(player.GetAll()) do
		DrawBox( 0, 37 + (k * 12), 334, 13, bgcolor, 2 )
		--draw.RoundedBox( 0, 0, 36, 334, 13, bgcolor)
		--draw.RoundedBox( 0, 0, 37 + (k * 12), 334, 13, bgcolor)
			surface.SetDrawColor(Color( 165, 165, 165, 255 ))
			surface.DrawOutlinedRect(0, 49, 335, y + (k * 12))
			draw.SimpleText( "Players: "..#player.GetAll(), "BudgetLabel", 3, 35, Color( 255, 140, 50, 255 ))
		if v:IsAdmin() then
			draw.SimpleText( "(Admin)", "UiBold", 290, 37 + (k * 12), Color(Fluctuate(3)*160, Fluctuate(3)*255, Fluctuate(3)*25, 255) )
		else
			draw.SimpleText( "(Guest)", "UiBold", 290, 37 + (k * 12), Color( 160, 255, 25, 255 ) )
		end
			draw.SimpleText( "Status", "DefaultUnderline", 290, 35, scolor )
			surface.DrawLine( 288, 49, 288, 51 + (k * 12) )
				draw.SimpleText( "Ping", "DefaultUnderline", 249, 35, scolor )
				surface.DrawLine( 247, 49, 247, 51 + (k * 12) )
					draw.SimpleText( "Kills", "DefaultUnderline", 155, 35, scolor )
						surface.DrawLine( 153, 49, 153, 51 + (k * 12) )
						draw.SimpleText( "Deaths", "DefaultUnderline", 200, 35, scolor )
						surface.DrawLine( 198, 49, 198, 51 + (k * 12) )
						draw.SimpleText( v:Nick(), "BudgetLabel", 3, 36 + (k * 12), team.GetColor(v:Team()) )
					draw.SimpleText( v:Ping(), "BudgetLabel", 249, 36 + (k * 12), ccolor )
				draw.SimpleText( v:Deaths(), "BudgetLabel", 200, 36 + (k * 12), ccolor )
			draw.SimpleText( v:Frags(), "BudgetLabel", 155, 36 + (k * 12), ccolor )

		if gamemode.Get("sandbox") then

	props = v:GetCount( "props" ) + v:GetCount( "ragdolls" ) + v:GetCount( "effects" ) + v:GetCount( "vehicles" ) + v:GetCount( "npcs" ) + v:GetCount( "hoverballs" ) + v:GetCount( "thrusters" ) + v:GetCount( "balloons" ) + v:GetCount( "buttons" ) + v:GetCount( "dynamite" ) + v:GetCount( "sents" )

		draw.SimpleText( props, "BudgetLabel", 102, 36 + ( k * 12 ), ccolor )
		draw.SimpleText( "Props", "DefaultUnderline", 102, 35, scolor )
		surface.DrawLine( 100, 49, 100, 51 + (k * 12) )
		end
	end
end
hook.Add( "HUDDrawScoreBoard", "Draw", HUDDrawScoreBoard )